Skip to content

DEV: Remove ignore Ruff rule RET503 #3209

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 15 commits into
base: main
Choose a base branch
from
Open

DEV: Remove ignore Ruff rule RET503 #3209

wants to merge 15 commits into from

Conversation

j-t-1
Copy link
Contributor

@j-t-1 j-t-1 commented Mar 21, 2025

RET503: Missing explicit "return" at the end of function able to return non-"None" value.

j-t-1 added 4 commits March 21, 2025 12:18
RET503: Missing explicit "return" at the end of function able to return non-"None" value.
RET503: Missing explicit "return" at the end of function able to return non-"None" value.
RET503: Missing explicit "return" at the end of function able to return non-"None" value.
RET503: Missing explicit "return" at the end of function able to return non-"None" value.
Copy link

codecov bot commented Mar 21, 2025

Codecov Report

Attention: Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.

Project coverage is 96.88%. Comparing base (bfe7178) to head (dd7dd06).

Files with missing lines Patch % Lines
pypdf/_writer.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3209      +/-   ##
==========================================
- Coverage   96.89%   96.88%   -0.01%     
==========================================
  Files          54       54              
  Lines        9263     9266       +3     
  Branches     1695     1695              
==========================================
+ Hits         8975     8977       +2     
- Misses        172      173       +1     
  Partials      116      116              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

j-t-1 added 5 commits March 22, 2025 15:11
RET503: Missing explicit "return" at the end of function able to return non-"None" value.
RET503: Missing explicit "return" at the end of function able to return non-"None" value.
RET503: Missing explicit "return" at the end of function able to return non-"None" value.
RET503: Missing explicit "return" at the end of function able to return non-"None" value.
RET503: Missing explicit "return" at the end of function able to return non-"None" value.
@stefan6419846 stefan6419846 added the needs-test A test should be added before this PR is merged. label Mar 24, 2025
@j-t-1
Copy link
Contributor Author

j-t-1 commented Jul 18, 2025

@stefan6419846 could you fix the two Ruff errors (2 fixable with the --fix option)? I do not have Ruff installed.

@stefan6419846
Copy link
Collaborator

could you fix the two Ruff errors

Just use return None instead of return in these cases if it is a correct detection (as indicated in the help for the violation). If the detection is wrong, we would have to check manually anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-test A test should be added before this PR is merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants